

**********************Replication for Trading Arguments: Opinion Updating in the Context of International Trade Agreements

******Authors: Spilker G, Nguyen Q, Bernauer T.


***Load Data
use "Replication_Data_ISQ.dta", clear

************** t-tests which are the basis for Figure 1***************
***********Germany*******************
***comparisons among respondents with same prior belief 

**Economic Issue

*Positive prior opinion, positive information
ttest ttip_econ_w2 if econ_prior_pos==1 & country=="DE", by(t_treat_econ_pos)
*Negative prior opinion, positive information
ttest ttip_econ_w2 if econ_prior_neg & country=="DE", by(t_treat_econ_pos)
*Neutral prior opinion, positive information
ttest ttip_econ_w2 if econ_prior_con, by(t_treat_econ_pos)

*Positive prior opinion, negative information
ttest ttip_econ_w2 if econ_prior_pos & country=="DE", by(t_treat_econ_neg)
*Negative prior opinion, negative information
ttest ttip_econ_w2 if econ_prior_neg & country=="DE", by(t_treat_econ_neg)
*Neutral prior opinion, negative information
ttest ttip_econ_w2 if econ_prior_con & country=="DE", by(t_treat_econ_neg)

*insert results of ttest in csv file "ttest_econ_issue.csv"

**Standard harmonization

*Positive prior opinion, positive information
ttest ttip_stand_w2 if stand_prior_pos & country=="DE", by(t_treat_stand_pos)
*Negative prior opinion, positive information
ttest ttip_stand_w2 if stand_prior_neg & country=="DE", by(t_treat_stand_pos)
*Neutral prior opinion, positive information
ttest ttip_stand_w2 if stand_prior_con & country=="DE", by(t_treat_stand_pos)

*Positive prior opinion, negative information
ttest ttip_stand_w2 if stand_prior_pos & country=="DE", by(t_treat_stand_neg)
*Negative prior opinion, negative information
ttest ttip_stand_w2 if stand_prior_neg & country=="DE", by(t_treat_stand_neg)
*Neutral prior opinion, negative information
ttest ttip_stand_w2 if stand_prior_con & country=="DE", by(t_treat_stand_neg)

*insert results of ttest in csv file "ttest_stand_issue.csv"

**ISDS

*Positive prior opinion, positive information
ttest ttip_isds_w2 if isds_prior_pos & country=="DE", by(t_treat_isds_pos)
*Negative prior opinion, positive information
ttest ttip_isds_w2 if isds_prior_neg & country=="DE", by(t_treat_isds_pos)
*Neutral prior opinion, positive information
ttest ttip_isds_w2 if isds_prior_con & country=="DE", by(t_treat_isds_pos)

*Positive prior opinion, negative information
ttest ttip_isds_w2 if isds_prior_pos & country=="DE", by(t_treat_isds_neg)
*Negative prior opinion, negative information
ttest ttip_isds_w2 if isds_prior_neg & country=="DE", by(t_treat_isds_neg)
*Neutral prior opinion, negative information
ttest ttip_isds_w2 if isds_prior_con & country=="DE", by(t_treat_isds_neg)

*insert results of ttest in csv file "ttest_isds_issue.csv"

***********US*******************
***comparisons among respondents with same prior belief 

**Economic Issue

*Positive prior opinion, positive information
ttest ttip_econ_w2 if econ_prior_pos==1 & country=="US", by(t_treat_econ_pos)
*Negative prior opinion, positive information
ttest ttip_econ_w2 if econ_prior_neg & country=="US", by(t_treat_econ_pos)
*Neutral prior opinion, positive information
ttest ttip_econ_w2 if econ_prior_con, by(t_treat_econ_pos)

*Positive prior opinion, negative information
ttest ttip_econ_w2 if econ_prior_pos & country=="US", by(t_treat_econ_neg)
*Negative prior opinion, negative information
ttest ttip_econ_w2 if econ_prior_neg & country=="US", by(t_treat_econ_neg)
*Neutral prior opinion, negative information
ttest ttip_econ_w2 if econ_prior_con & country=="US", by(t_treat_econ_neg)

*insert results of ttest in csv file "ttest_econ_issue.csv"

**Standard harmonization

*Positive prior opinion, positive information
ttest ttip_stand_w2 if stand_prior_pos & country=="US", by(t_treat_stand_pos)
*Negative prior opinion, positive information
ttest ttip_stand_w2 if stand_prior_neg & country=="US", by(t_treat_stand_pos)
*Neutral prior opinion, positive information
ttest ttip_stand_w2 if stand_prior_con & country=="US", by(t_treat_stand_pos)

*Positive prior opinion, negative information
ttest ttip_stand_w2 if stand_prior_pos & country=="US", by(t_treat_stand_neg)
*Negative prior opinion, negative information
ttest ttip_stand_w2 if stand_prior_neg & country=="US", by(t_treat_stand_neg)
*Neutral prior opinion, negative information
ttest ttip_stand_w2 if stand_prior_con & country=="US", by(t_treat_stand_neg)

*insert results of ttest in csv file "ttest_stand_issue.csv"

**ISDS

*Positive prior opinion, positive information
ttest ttip_isds_w2 if isds_prior_pos & country=="US", by(t_treat_isds_pos)
*Negative prior opinion, positive information
ttest ttip_isds_w2 if isds_prior_neg & country=="US", by(t_treat_isds_pos)
*Neutral prior opinion, positive information
ttest ttip_isds_w2 if isds_prior_con & country=="US", by(t_treat_isds_pos)

*Positive prior opinion, negative information
ttest ttip_isds_w2 if isds_prior_pos & country=="US", by(t_treat_isds_neg)
*Negative prior opinion, negative information
ttest ttip_isds_w2 if isds_prior_neg & country=="US", by(t_treat_isds_neg)
*Neutral prior opinion, negative information
ttest ttip_isds_w2 if isds_prior_con & country=="US", by(t_treat_isds_neg)


*insert results of ttest in csv file "ttest_isds_issue.csv"


**************** t-tests which are the basis for Figure 2*****************

**all three issues combined but conditional on how much people care about TTIP

************Germany*******************
***care a lot - values 4 and 5

ttest issue_opinion if issue_prior_pos==1 & interest_TTIP>3 & country=="DE", by(issue_treat_pos)
ttest issue_opinion if issue_prior_neg & interest_TTIP>3 & country=="DE", by(issue_treat_pos)
ttest issue_opinion if issue_prior_con & interest_TTIP>3 & country=="DE", by(issue_treat_pos)

ttest issue_opinion if issue_prior_pos & interest_TTIP>3 & country=="DE", by(issue_treat_neg)
ttest issue_opinion if issue_prior_neg & interest_TTIP>3 & country=="DE", by(issue_treat_neg)
ttest issue_opinion if issue_prior_con & interest_TTIP>3 & country=="DE", by(issue_treat_neg)

**medium - value 3
ttest issue_opinion if issue_prior_pos==1 & interest_TTIP==3 & country=="DE", by(issue_treat_pos)
ttest issue_opinion if issue_prior_neg & interest_TTIP==3 & country=="DE", by(issue_treat_pos)
ttest issue_opinion if issue_prior_con & interest_TTIP==3 & country=="DE", by(issue_treat_pos)

ttest issue_opinion if issue_prior_pos & interest_TTIP==3 & country=="DE", by(issue_treat_neg)
ttest issue_opinion if issue_prior_neg & interest_TTIP==3 & country=="DE", by(issue_treat_neg)
ttest issue_opinion if issue_prior_con & interest_TTIP==3 & country=="DE", by(issue_treat_neg)

*not much - values 1 and 2
ttest issue_opinion if issue_prior_pos==1 & interest_TTIP<3 & country=="DE", by(issue_treat_pos)
ttest issue_opinion if issue_prior_neg & interest_TTIP<3 & country=="DE", by(issue_treat_pos)
ttest issue_opinion if issue_prior_con & interest_TTIP<3 & country=="DE", by(issue_treat_pos)

ttest issue_opinion if issue_prior_pos & interest_TTIP<3 & country=="DE", by(issue_treat_neg)
ttest issue_opinion if issue_prior_neg & interest_TTIP<3 & country=="DE", by(issue_treat_neg)
ttest issue_opinion if issue_prior_con==1 & interest_TTIP<3 & country=="DE", by(issue_treat_neg)

*insert results of ttest in csv file "ttest_combined_interest_deu.csv"

************US*******************
***care a lot - values 4 and 5

ttest issue_opinion if issue_prior_pos==1 & interest_TTIP>3 & country=="US", by(issue_treat_pos)
ttest issue_opinion if issue_prior_neg & interest_TTIP>3 & country=="US", by(issue_treat_pos)
ttest issue_opinion if issue_prior_con & interest_TTIP>3 & country=="US", by(issue_treat_pos)

ttest issue_opinion if issue_prior_pos & interest_TTIP>3 & country=="US", by(issue_treat_neg)
ttest issue_opinion if issue_prior_neg & interest_TTIP>3 & country=="US", by(issue_treat_neg)
ttest issue_opinion if issue_prior_con & interest_TTIP>3 & country=="US", by(issue_treat_neg)

**medium - value 3
ttest issue_opinion if issue_prior_pos==1 & interest_TTIP==3 & country=="US", by(issue_treat_pos)
ttest issue_opinion if issue_prior_neg & interest_TTIP==3 & country=="US", by(issue_treat_pos)
ttest issue_opinion if issue_prior_con & interest_TTIP==3 & country=="US", by(issue_treat_pos)

ttest issue_opinion if issue_prior_pos & interest_TTIP==3 & country=="US", by(issue_treat_neg)
ttest issue_opinion if issue_prior_neg & interest_TTIP==3 & country=="US", by(issue_treat_neg)
ttest issue_opinion if issue_prior_con & interest_TTIP==3 & country=="US", by(issue_treat_neg)

*not much - values 1 and 2
ttest issue_opinion if issue_prior_pos==1 & interest_TTIP<3 & country=="US", by(issue_treat_pos)
ttest issue_opinion if issue_prior_neg & interest_TTIP<3 & country=="US", by(issue_treat_pos)
ttest issue_opinion if issue_prior_con & interest_TTIP<3 & country=="US", by(issue_treat_pos)

ttest issue_opinion if issue_prior_pos & interest_TTIP<3 & country=="US", by(issue_treat_neg)
ttest issue_opinion if issue_prior_neg & interest_TTIP<3 & country=="US", by(issue_treat_neg)
ttest issue_opinion if issue_prior_con==1 & interest_TTIP<3 & country=="US", by(issue_treat_neg)

*insert results of ttest in csv file "ttest_combined_interest_usa.csv"

************************* t-tests which are the basis for Figure 3***************************
****** Does a justification make a difference?


*Combine the three treatments into one variable
gen issue_treat_pos_j=t_treat_econ_pos_j
replace issue_treat_pos_j=t_treat_stand_pos_j if issue_treat_pos_j==.
replace issue_treat_pos_j=t_treat_isds_pos_j if issue_treat_pos_j==.

gen issue_treat_neg_j=t_treat_econ_neg_j
replace issue_treat_neg_j=t_treat_stand_neg_j if issue_treat_neg_j==.
replace issue_treat_neg_j=t_treat_isds_neg_j if issue_treat_neg_j==.

gen issue_treat_pos_nj=t_treat_econ_pos_nj
replace issue_treat_pos_nj=t_treat_stand_pos_nj if issue_treat_pos_nj==.
replace issue_treat_pos_nj=t_treat_isds_pos_nj if issue_treat_pos_nj==.

gen issue_treat_neg_nj=t_treat_econ_neg_nj
replace issue_treat_neg_nj=t_treat_stand_neg_nj if issue_treat_neg_nj==.
replace issue_treat_neg_nj=t_treat_isds_neg_nj if issue_treat_neg_nj==.


**************Germany*******************
ttest issue_opinion if issue_prior_pos==1 & country=="DE", by(issue_treat_pos_j)
ttest issue_opinion if issue_prior_neg & country=="DE", by(issue_treat_pos_j)
ttest issue_opinion if issue_prior_con & country=="DE", by(issue_treat_pos_j)

ttest issue_opinion if issue_prior_pos & country=="DE", by(issue_treat_neg_j)
ttest issue_opinion if issue_prior_neg & country=="DE", by(issue_treat_neg_j)
ttest issue_opinion if issue_prior_con & country=="DE", by(issue_treat_neg_j)


ttest issue_opinion if issue_prior_pos==1 & country=="DE", by(issue_treat_pos_nj)
ttest issue_opinion if issue_prior_neg & country=="DE", by(issue_treat_pos_nj)
ttest issue_opinion if issue_prior_con & country=="DE", by(issue_treat_pos_nj)

ttest issue_opinion if issue_prior_pos & country=="DE", by(issue_treat_neg_nj)
ttest issue_opinion if issue_prior_neg & country=="DE", by(issue_treat_neg_nj)
ttest issue_opinion if issue_prior_con & country=="DE", by(issue_treat_neg_nj)

*insert results of ttest in csv file "ttest_combined_justification_deu.csv"


**************US*******************
ttest issue_opinion if issue_prior_pos==1 & country=="US", by(issue_treat_pos_j)
ttest issue_opinion if issue_prior_neg & country=="US", by(issue_treat_pos_j)
ttest issue_opinion if issue_prior_con & country=="US", by(issue_treat_pos_j)

ttest issue_opinion if issue_prior_pos & country=="US", by(issue_treat_neg_j)
ttest issue_opinion if issue_prior_neg & country=="US", by(issue_treat_neg_j)
ttest issue_opinion if issue_prior_con & country=="US", by(issue_treat_neg_j)


ttest issue_opinion if issue_prior_pos==1 & country=="US", by(issue_treat_pos_nj)
ttest issue_opinion if issue_prior_neg & country=="US", by(issue_treat_pos_nj)
ttest issue_opinion if issue_prior_con & country=="US", by(issue_treat_pos_nj)

ttest issue_opinion if issue_prior_pos & country=="US", by(issue_treat_neg_nj)
ttest issue_opinion if issue_prior_neg & country=="US", by(issue_treat_neg_nj)
ttest issue_opinion if issue_prior_con & country=="US", by(issue_treat_neg_nj)

*insert results of ttest in csv file "ttest_combined_justification_usa.csv"


****************Figure 4*************
**********Germany*******************

***ttest for pro TTIP petition action

**all three issues combined
ttest proTTIP if issue_prior_pos==1 & country=="DE", by(issue_treat_pos)
ttest proTTIP if issue_prior_neg & country=="DE", by(issue_treat_pos)
ttest proTTIP if issue_prior_con & country=="DE", by(issue_treat_pos)

ttest proTTIP if issue_prior_pos & country=="DE", by(issue_treat_neg)
ttest proTTIP if issue_prior_neg & country=="DE", by(issue_treat_neg)
ttest proTTIP if issue_prior_con & country=="DE", by(issue_treat_neg)

*insert results of ttest in csv file "ttest_combined_behavior_pro.csv"

***ttest for contra TTIP petition action
ttest contraTTIP if issue_prior_pos==1 & country=="DE", by(issue_treat_pos)
ttest contraTTIP if issue_prior_neg & country=="DE", by(issue_treat_pos)
ttest contraTTIP if issue_prior_con & country=="DE", by(issue_treat_pos)

ttest contraTTIP if issue_prior_pos & country=="DE", by(issue_treat_neg)
ttest contraTTIP if issue_prior_neg & country=="DE", by(issue_treat_neg)
ttest contraTTIP if issue_prior_con & country=="DE", by(issue_treat_neg)


*insert results of ttest in csv file "ttest_combined_behavior_contra.csv"



****US*******************
***ttest for pro TTIP petition action

sort country
by country: tab proTTIP contraTTIP, mis

**all three issues combined
ttest proTTIP if issue_prior_pos==1 & country=="US", by(issue_treat_pos)
ttest proTTIP if issue_prior_neg & country=="US", by(issue_treat_pos)
ttest proTTIP if issue_prior_con & country=="US", by(issue_treat_pos)

ttest proTTIP if issue_prior_pos & country=="US", by(issue_treat_neg)
ttest proTTIP if issue_prior_neg & country=="US", by(issue_treat_neg)
ttest proTTIP if issue_prior_con & country=="US", by(issue_treat_neg)

*insert results of ttest in csv file "ttest_combined_behavior_pro.csv"

***ttest for contra TTIP petition action
ttest contraTTIP if issue_prior_pos==1 & country=="US", by(issue_treat_pos)
ttest contraTTIP if issue_prior_neg & country=="US", by(issue_treat_pos)
ttest contraTTIP if issue_prior_con & country=="US", by(issue_treat_pos)

ttest contraTTIP if issue_prior_pos & country=="US", by(issue_treat_neg)
ttest contraTTIP if issue_prior_neg & country=="US", by(issue_treat_neg)
ttest contraTTIP if issue_prior_con & country=="US", by(issue_treat_neg)

*insert results of ttest in csv file "ttest_combined_behavior_contra.csv"
